-module(testnif).
-on_load(init/0).

-export([
	test/0
]).

init() ->
	SoName = case code:priv_dir(?MODULE) of 
		{error, bad_name} ->
			"error badname";
		Dir ->
			filename:join([priv, ?MODULE])
	end,
	io:format("~s~n", [SoName]),
	erlang:load_nif("libtest1", 0).

test() ->
	exit(nif_library_not_loaded).